package com.github.prontera.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.github.prontera.domain.ClientAccount;
import com.github.prontera.persistence.ClientAccountMapper;
import com.github.prontera.persistence.CrudMapper;

/**
 * 客户账户
 */
@Service
public class ClientAccountService extends CrudServiceImpl<ClientAccount>{
    
	@Autowired
	private ClientAccountMapper clientAccountMapper;
	
  	@Autowired
    public ClientAccountService(CrudMapper<ClientAccount> mapper) {
        super(mapper);
    }

  	@Transactional(propagation = Propagation.REQUIRED)
	public boolean updateAccount(ClientAccount clientAccount) {
		return clientAccountMapper.updateAccount(clientAccount)>0;
	}

}
